package com.movitech.mobile.cz.base.sys.mapper.ext;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.movitech.mobile.cz.base.sys.entity.SMessages;
import com.movitech.mobile.cz.base.sys.entity.ext.ExtSMessageTemplate;
import com.movitech.mobile.cz.base.sys.entity.ext.ExtSMessages;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 消息通知 Mapper 接口
 * </p>
 *
 * @author Movitech Mobile
 * @since 2018-03-01
 */
@Component
@Mapper
public interface ExtSMessagesMapper extends BaseMapper<SMessages> {

	/**
	 * 采购管理后台首页公告通知获取(除外网通知)
	 * @param map
	 * @return
	 */
    public List<ExtSMessages> getNoticeListByShowNum(Map<String, Object> map);

	public ExtSMessages getLastOneMessage(@Param("userId")String userId,@Param("msgType") Integer msgType);

	public List<ExtSMessages> getMessagesList(Map<String, Object> map);

	public Integer getMessagesListCount(Map<String, Object> map);

	public int getMessageCounts(Map<String, Object> param);

	public long getNoticeListCount(Map<String, Object> map);

}
